<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action="" name="tw">
        <input type="text" name="title" />
      </form>
      <script>
          //表单name属性查找的
        const form = document.forms.tw;
        // console.log(form.elements.title)
        //可以直接写为
        console.log(form.title);

        //反向找表单
        console.log(form.title.form === form) //true
      </script>
</body>
</html>